﻿using System.Collections.Generic;
using WeiboEx.Models;

namespace WeiboEx
{
    /// <summary>
    /// 微博操作接口
    /// </summary>
    public interface IWeibo
    {
        WeiboUser User { get; set; }

        OAuthModel OAuthKey { get; }

        string GetAuthorizationUri(OAuthModel oauth, string callback);

        bool GetRequsetToken();

        bool GetAccessToken(string token, string tokensecret, string verifier);
        /// <summary>
        /// 验证用户.
        /// </summary>
        /// <returns></returns>
        bool Auth();

        /// <summary>
        /// 更新头像.
        /// </summary>
        /// <param name="pic">The pic.</param>
        /// <returns></returns>
        bool UpdateProfileImage(string pic);

        /// <summary>
        /// 关注.
        /// </summary>
        /// <param name="userId">The user id.</param>
        /// <returns></returns>
        bool FollowMe(string userId);

        /// <summary>
        /// 发布消息.
        /// </summary>
        /// <param name="status">The status.</param>
        /// <param name="tweetid"></param>
        /// <returns></returns>
        bool UpdateStatus(string status, out long tweetid);

        /// <summary>
        /// 发布带图微博.
        /// </summary>
        /// <param name="status">The status.</param>
        /// <param name="pic">The pic.</param>
        /// <param name="tweetid">The tweetid.</param>
        /// <returns></returns>
        bool UploadStatus(string status, string pic, out long tweetid);

        /// <summary>
        /// 转发微博.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <param name="status">The status.</param>
        /// <param name="retweetid"></param>
        /// <returns></returns>
        bool Repost(long id, string status, out long retweetid);

        /// <summary>
        /// 获取用户发布的微博.
        /// </summary>
        /// <param name="count">The count.</param>
        /// <param name="page">The page.</param>
        /// <param name="statuses"></param>
        /// <returns></returns>
        bool UserTimeLine(int count, int page, out IEnumerable<Status> statuses);
    }
}
